#ifndef __JK_TRAITS_H_
#define __JK_TRAITS_H_

#include "jk_base.h"

JK_LIB_NAMESPACE_BEGIN


template <typename T>
struct TypeTrait
{
    typedef typename T  value_type;
};

template <typename T>
struct TypeTrait<T*>
{
    typedef typename T  value_type;
};

template <typename T, typename typename U>
struct IsSameTypeTrait
{
    enum
    {
        value = 0
    };
};

template <typename T>
struct IsSameTypeTrait<T, T>
{
    enum
    {
        value = 1
    };
};

template <typename ContainerType>
struct ContainerTraits
{
};

template <typename T, typename ContainerType>
class Container;

template <typename ContainerType>
struct ContainerTraits
{
    typedef T                               value_type;
    typedef T&                              reference;
    typedef const T&                        const_reference;
    typedef T*                              pointer;
    typedef const T*                        const_pointer;
    typedef int                             size_type;
};

JK_LIB_NAMESPACE_END

#endif //!__JK_TRAITS_H_
